package model;
// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Tsalereturnitem entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tsalereturnitem", catalog = "test")
public class Tsalereturnitem implements java.io.Serializable {

	// Fields

	private String id;
	private Tshoplist tshoplist;
	private Tsalereturn tsalereturn;
	private Integer quantity;
	private Double refundment;

	// Constructors

	/** default constructor */
	public Tsalereturnitem() {
	}

	/** minimal constructor */
	public Tsalereturnitem(String id) {
		this.id = id;
	}

	/** full constructor */
	public Tsalereturnitem(String id, Tshoplist tshoplist, Tsalereturn tsalereturn, Integer quantity, Double refundment) {
		this.id = id;
		this.tshoplist = tshoplist;
		this.tsalereturn = tsalereturn;
		this.quantity = quantity;
		this.refundment = refundment;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "productid")
	public Tshoplist getTshoplist() {
		return this.tshoplist;
	}

	public void setTshoplist(Tshoplist tshoplist) {
		this.tshoplist = tshoplist;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "salereturnid")
	public Tsalereturn getTsalereturn() {
		return this.tsalereturn;
	}

	public void setTsalereturn(Tsalereturn tsalereturn) {
		this.tsalereturn = tsalereturn;
	}

	@Column(name = "quantity")
	public Integer getQuantity() {
		return this.quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	@Column(name = "refundment", precision = 22, scale = 0)
	public Double getRefundment() {
		return this.refundment;
	}

	public void setRefundment(Double refundment) {
		this.refundment = refundment;
	}

}